import HttpService from "@/api";

/**
 * @description 获取菜单列表
 * @param params
 * @returns
 */
export const getMenuListApi = (params: any) => HttpService.get<any>(`/system/menu/list`, { params });

/**
 * @description 获取菜单下拉树列表
 * @param id
 * @returns
 */
export const getMenuTreeSelectApi = () => HttpService.get<any>(`/system/menu/treeSelect`);

/**
 * @description 新增菜单
 * @param data
 * @returns
 */
export const addMenuApi = (data: any) => HttpService.post<any>(`/system/menu`, data);

/**
 * @description 修改菜单
 * @param data
 * @returns
 */
export const updeMenuApi = (data: any) => HttpService.put<any>(`/system/menu`, data);

/**
 * @description 删除菜单
 * @param id
 * @returns
 */
export const delMenuApi = (id: number) => HttpService.delete<any>(`/system/menu/${id}`);

/**
 * @description 根据菜单编号获取详细信息
 * @param menuId
 * @returns
 */
export const getMeuByIdApi = (menuId: number) => HttpService.get<any>(`/system/menu/${menuId}`);
